package bar;

public enum Lug {
    Null("null", -1), Zero("0", 0), Zero2("00", 0), One("1", 1), Two("2", 2), Three("3", 3), Four("4", 4), Five("5", 5), Six("6", 6);

    private final String id;
    private final int val;

    Lug(String id, int val) {
	this.id = id;
	this.val = val;
    }

    /**
     * @return the id
     */
    public String getId() {
	return id;
    }

    public int getVal() {
	return val;
    }

    public static Lug StringToLug(String id) {
	if (id.equals("0")) {
	    return Lug.Zero;
	} else if (id.equals("00")) {
	    return Lug.Zero2;
	} else if (id.equals("1")) {
	    return Lug.One;
	} else if (id.equals("2")) {
	    return Lug.Two;
	} else if (id.equals("3")) {
	    return Lug.Three;
	} else if (id.equals("4")) {
	    return Lug.Four;
	} else if (id.equals("5")) {
	    return Lug.Five;
	} else if (id.equals("6")) {
	    return Lug.Six;
	} else {
	    //System.out.println("Lug.StringToLug() id=:"+id);
	    return Lug.Null;
	}
    }
}
